<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3属性calc函数</title>
    <style>
        .father{
            width: 300px;
            height: 200px;
            background-color: pink;
        }
        .son{
            width: calc(100% - 30px);
            height: 20px;
            background-color: blue;
        }
    </style>
</head>
<body>
     <!-- 需求我们的子盒子宽度永远比父盒子小30像素 --> 
      <div class="father">
         <div class="son"> </div>
     </div>
</body>
</html>

